Skip to content

Fixed NPE on lib upgrade command #1874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Sep 9, 2022

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What is the new behavior?
$ arduino-cli lib install Servo
Downloading [email protected]...
[email protected] already downloaded
Installing [email protected]...
Installed [email protected]

$ arduino-cli lib upgrade Servo
Library Servo is already at the latest version

$ arduino-cli lib uninstall Servo
Uninstalling [email protected]...
$ arduino-cli lib upgrade Servo
Error upgrading libraries: Library 'Servo' not found

@cmaglie cmaglie changed the title Fixed NPE on 'lib upgrade' command Fixed NPE on lib upgrade command Sep 9, 2022
@cmaglie cmaglie self-assigned this Sep 9, 2022
@cmaglie cmaglie added priority: high Resolution is a high priority topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project criticality: medium Of moderate impact labels Sep 9, 2022
@cmaglie cmaglie requested review from umbynos and per1234 September 9, 2022 15:08
@cmaglie cmaglie linked an issue Sep 9, 2022 that may be closed by this pull request
3 tasks
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #1874 (7395768) into master (8b52e80) will increase coverage by 0.06%.
The diff coverage is 8.33%.

@@            Coverage Diff             @@
##           master    #1874      +/-   ##
==========================================
+ Coverage   36.66%   36.72%   +0.06%     
==========================================
  Files         231      231              
  Lines       19658    19666       +8     
==========================================
+ Hits         7207     7223      +16     
+ Misses      11622    11618       -4     
+ Partials      829      825       -4     
Flag Coverage Δ
unit 36.72% <8.33%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
commands/lib/upgrade.go 0.00% <0.00%> (ø)
internal/integrationtest/arduino-cli.go 84.00% <100.00%> (+0.06%) ⬆️
arduino/cores/packagemanager/package_manager.go 66.58% <0.00%> (+0.75%) ⬆️
arduino/monitor/monitor.go 47.36% <0.00%> (+6.31%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified this fixes #1868

Thanks Cristian!

@cmaglie cmaglie merged commit 736608f into arduino:master Sep 12, 2022
@cmaglie cmaglie deleted the fix_upgrade_npe branch September 12, 2022 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
criticality: medium Of moderate impact priority: high Resolution is a high priority topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when library specified via upgrade command is not upgradable
2 participants